<?php
/**
 * Created by PhpStorm.
 * User: tangping
 * Date: 16/4/23
 * Time: 下午9:01
 */

namespace Models;
use Phalcon\Mvc\Model\Behavior\SoftDelete;

defined('TIMESTAMP') || define('TIMESTAMP',time());
class User extends ModelBase
{
    const DELETED = TIMESTAMP;

    const NOT_DELETED = '';

    public function initialize()
    {
        parent::initialize();
        $this->addBehavior(
            new SoftDelete(
                array(
                    'field' => 'status',
                    'value' => User::DELETED
                )
            )
        );
    }



}